<nz-row *ngIf="!(canBackup$|async)||false">
  <h1>还没有设置默认配置，请先去
    <a routerLink="/">设置</a>
  </h1>
</nz-row>
<nz-row *ngIf="(canBackup$|async)||false">
  <nz-col nzSpan="4">
    <button nz-button nzType="primary" nzSize="large" (click)="backup()"
            [nzLoading]="(loading$|async)||false">
      立即备份
    </button>
  </nz-col>
  <nz-col nzSpan="20">
    <h1>当前配置：{{(defaultParam$|async) ? (defaultParam$|async).name : ''}}</h1>
  </nz-col>
</nz-row>
<nz-row *ngIf="(canBackup$|async)||false">
  <nz-col nzSpan="24">
    <nz-table #basicTable [nzData]="list">
      <thead>
      <tr>
        <th>操作</th>
        <th>文件名</th>
        <th>修改时间</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable.data">
        <td>
          <a>
            <button nz-button nzType="primary" (click)="revert(data.name)" [nzLoading]="(loading$|async)||false">
              还原
            </button>
          </a>
        </td>
        <td>{{data.name}}</td>
        <td>{{data.mtime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
      </tr>
      </tbody>
    </nz-table>
  </nz-col>
</nz-row>
